<nz-spin [nzSpinning]="isSpinning">
  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm($event,validateForm.value)">
    <!-- 隐藏id -->
    <input type="hidden" formControlName="id">
    <!--**************************************-->
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
        <label for="authorName" nz-form-item-required>权限名称</label>
      </div>
      <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback [nzValidateStatus]="getFormControl('authorName')">
        <nz-input [nzSize]="'large'" formControlName="authorName" [nzId]="'authorName'"></nz-input>
        <div nz-form-explain *ngIf="getFormControl('authorName').dirty&&getFormControl('authorName').hasError('required')">权限名称不能为空!</div>
      </div>
    </div>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
        <label for="sysType" nz-form-item-required>所属类型</label>
      </div>
      <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback [nzValidateStatus]="getFormControl('sysType')">
        <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" name="sysType" formControlName="sysType" [nzSize]="'large'">
          <nz-option *ngFor="let option of searchOptions" [nzLabel]="option.label" [nzValue]="option.value" [nzDisabled]="option.disabled">
          </nz-option>
        </nz-select>
        <div nz-form-explain *ngIf="getFormControl('sysType').dirty&&getFormControl('sysType').hasError('required')">所属类型不能为空!</div>
      </div>
    </div>
    <!-- <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
            <label for="sysType" nz-form-item-required>图标</label>
        </div>
        <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback [nzValidateStatus]="getFormControl('sysType')">
            <nz-select
                    nzAllowClear
                    [nzPlaceHolder]="'请选择'"
                    [nzShowSearch]="true" name="authorIcon" formControlName="authorIcon" [nzSize]="large">
                <nz-option
                        *ngFor="let option of searchOptions"
                        [nzLabel]="option.label"
                        [nzValue]="option.value"
                        [nzDisabled]="option.disabled">
                </nz-option>
            </nz-select>
            <div nz-form-explain *ngIf="getFormControl('authorIcon').dirty&&getFormControl('authorIcon').hasError('required')">图标不能为空!</div>
        </div>
    </div> -->
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
        <label for="parentId">上级菜单</label>
      </div>
      <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
        <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" name="parentId" formControlName="parentId" [nzSize]="'large'">
          <nz-option [nzLabel]="'顶级菜单'" [nzValue]="0" [nzDisabled]="false">
          </nz-option>
          <nz-option *ngFor="let option of functions" [nzLabel]="option.authorName" [nzValue]="option.id" [nzDisabled]="option.disabled">
          </nz-option>
        </nz-select>
      </div>
    </div>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
        <label for="authorUrl">地址</label>
      </div>
      <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
        <nz-input name="authorUrl" [nzId]="'authorUrl'" formControlName="authorUrl" [nzSize]="'large'"></nz-input>
      </div>
    </div>
    <div nz-form-item nz-row>
      <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
        <label for="authorDescribe">权限描述</label>
      </div>
      <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
        <nz-input name="authorDescribe" [nzId]="'authorDescribe'" formControlName="authorDescribe" [nzSize]="'large'"></nz-input>
      </div>
    </div>
    <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
            <label for="authorId" nz-form-item-required>权限Id</label>
        </div>
        <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback [nzValidateStatus]="getFormControl('authorId')">
            <nz-input [nzSize]="'large'" formControlName="authorId" [nzId]="'authorId'"></nz-input>
            <div nz-form-explain *ngIf="getFormControl('authorId').dirty&&getFormControl('authorId').hasError('required')">权限名称不能为空!</div>
        </div>
    </div>
    <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
            <label for="authorType" nz-form-item-required>权限类型</label>
        </div>
        <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback [nzValidateStatus]="getFormControl('authorType')">
            <nz-select
                    nzAllowClear
                    [nzPlaceHolder]="'请选择'"
                    [nzShowSearch]="true" name="authorType" formControlName="authorType" [nzSize]="'large'">
                
                <nz-option
                        *ngFor="let option of authorOptions"
                        [nzLabel]="option.label"
                        [nzValue]="option.value"
                        [nzDisabled]="option.disabled">
                </nz-option>
            </nz-select>
            <div nz-form-explain *ngIf="getFormControl('authorType').dirty&&getFormControl('authorType').hasError('required')">所属类型不能为空!</div>
        </div>
    </div>
    <div nz-form-item nz-row style="margin-bottom:8px;">
      <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="10">
        <button nz-button [nzSize]="'large'" [nzType]="'primary'">修改</button>
      </div>
    </div>
  </form>
</nz-spin>
